import React, { Component } from 'react'
//路由传参
import {withRouter} from "react-router-dom"

class Index extends Component {
    
    // handleClick = (params) => {
    //     this.props.history.push("/searchCenter");
    // }
    
    render() {
        return (
          <div>

                
                <div
                style={{
                    marginTop:100,
                    background:"#eeeeee",
                    width:"100%",
                    height:"100%"
                }}
                >
                <List>

                <InputItem
                    clear
                    placeholder="username"
                    value={this.state.userTxt}
                    onChange={txt=>this.setState({userTxt:txt})}
                >
                    <div style={{ backgroundImage: 'url(https://zos.alipayobjects.com/rmsportal/DfkJHaJGgMghpXdqNaKF.png)', backgroundSize: 'cover', height: '22px', width: '22px' }} />
                </InputItem>
                <InputItem
                    clear
                    placeholder="address"
                    value={this.state.addressTxt}
                    onChange={txt=>this.setState({addressTxt:txt})}
                >
                    <div style={{ backgroundImage: 'url(http://qvlj6gd8v.hn-bkt.clouddn.com/address.png)', backgroundSize: 'cover', height: '22px', width: '22px' }} />
                </InputItem>

                </List>
                {/* 单选框 */}
                <List>
                {data.map(i => (
                <RadioItem key={i.value} checked={value === i.value} onChange={() => this.onChange(i.value)}>
                    {i.label}
                </RadioItem>
                ))}
                </List>

                <Button
                type="primary" onClick={this.handleClick}>Register</Button>
                {/* 根据用户的id生成独立的二维码 */}
                {/* <QRCode
                value={codeUrl}
                size={200}
                >   

                </QRCode> */}
                <CopyToClipboard text='复制的内容111111' onCopy={() => {Toast.loading('Loading...', 1, () => {
                        console.log('Load complete !!!');
                    });}}>
                        <p>点击复制</p>
                </CopyToClipboard>
                {/* 气泡 */}
                <NavBar
                mode="light"
                rightContent={
                <Popover mask
                overlayClassName="fortest"
                overlayStyle={{ color: 'currentColor' }}
                visible={this.state.visible}
                overlay={[
                (<Item key="4" value="scan" icon={myImg('tOtXhkIWzwotgGSeptou')} data-seed="logId">Scan</Item>),
                (<Item key="5" value="special" icon={myImg('PKAgAqZWJVNwKsAJSmXd')} style={{ whiteSpace: 'nowrap' }}>My Qrcode</Item>),
                (<Item key="6" value="button ct" icon={myImg('uQIYTFeRrjPELImDRrPt')}>
                <span style={{ marginRight: 5 }}>Help</span>
                </Item>),
                ]}
                align={{
                overflow: { adjustY: 0, adjustX: 0 },
                offset: [-10, 0],
                }}
                onVisibleChange={this.handleVisibleChange}
                onSelect={this.onSelect}
                >
                <div style={{
                height: '100%',
                padding: '0 15px',
                marginRight: '-15px',
                display: 'flex',
                alignItems: 'center',
                }}
                >
                <Icon type="ellipsis" />
                </div>
                </Popover>
                }
                >
                通过什么渠道认识了EZblu
                </NavBar>
                {/* 手风琴 */}
                <div style={{ marginTop: 10, marginBottom: 10 }}>
                <Accordion defaultActiveKey="0" className="my-accordion" onChange={this.onChangeSelect}>
                <Accordion.Panel header={this.state.headerTxt}>
                <List className="my-list">
                {data.map(i => (
                <div>
                    <RadioItem key={i.value} checked={value === i.value} onChange={() => this.onChange(i.value)}>
                        {i.label}
                    </RadioItem>
                </div>
                ))}

                </List>
                </Accordion.Panel>

                </Accordion>
                </div>
                {/* 手风琴结束 */}
                <input 
                // className={classes.picker}
                accept='image/*'
                multiple  
                capture="camera"
                onChange={this.onfileChange} 
                >

                </input>
                <div
                style={{position:"absolute",left:0,bottom:0}}
                >{this.state.addressIp}</div>
                </div>


          </div>
        )
    }
}
export default withRouter(Index)


